//
//  ViewController.m
//  事件的产生与传递应用二
//
//  Created by hyl on 16/6/19.
//  Copyright © 2016年 hyl. All rights reserved.
//

#import "ViewController.h"
#import "HYLButton.h"
@interface ViewController ()

@end

@implementation ViewController
- (IBAction)popBtn:(HYLButton *)sender {
    HYLButton *btn=[HYLButton buttonWithType:UIButtonTypeCustom];
    btn.bounds=CGRectMake(0, 0, 200, 200);
    btn.center=CGPointMake(100, -100);
    [btn setBackgroundImage:[UIImage imageNamed:@"对话框"] forState:UIControlStateNormal];
    [btn setBackgroundImage:[UIImage imageNamed:@"小孩"] forState:UIControlStateHighlighted];
    sender.btn=btn;
    [sender addSubview:btn];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
